//
//  BusinessManager.swift
//  Business
//
//  Created by 章旭松 on 16/8/26.
//  Copyright © 2016年 章旭松. All rights reserved.
//

import Foundation
import Service1
import Service2
import Component

// 单例入口
public final class BusinessManager {
    public static let sharedInstance = BusinessManager()
    
    public func invokeWithUrl(url: String) {
        print(url)
        Service1.invokeWithUrl("Service1://function?from=Business&param1=value1&param2=value2")
        Service2.invokeWithUrl("Service2://function?from=Business&param1=value1&param2=value2")
        Component.invokeWithUrl("Component://function?from=Business&param1=value1&param2=value2")
    }
}

// 全局函数入口
public func invokeWithUrl(url: String) {
    BusinessManager.sharedInstance.invokeWithUrl(url)
}
